package com.ray.consumer;

import com.alibaba.dubbo.config.annotation.Reference;
import com.ray.service.UserService;
import org.springframework.boot.CommandLineRunner;
import org.springframework.stereotype.Component;

@Component
public class UserInit implements CommandLineRunner {

    @Reference(interfaceClass = UserService.class)
    private UserService userService;
    @Override
    public void run(String... args) throws Exception {
        System.out.println(userService.selectUserById(2));
    }
}
